Method and apparatus for forwarding MPLS data packet

ABSTRACT

A method and an apparatus for forwarding an MPLS data packet are provided, which are used in an environment of hybrid networking of an SR network and a non-SR network. The method includes: when obtaining a to-be-sent MPLS data packet, a first SR router in an SR network determines whether a next-hop router supports an SR characteristic; the first SR router encapsulates the MPLS data packet into an IP tunnel when determining that the next-hop router does not support the SR characteristic, and sends an encapsulated MPLS data packet to the next-hop router to enable the encapsulated MPLS data packet to be forwarded, based on an IP routing table, to a second SR router. According to the application, correct forwarding of an MPLS data packet is completed in an environment of hybrid networking of an SR router and a non-SR router.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.16/360,965, filed on Mar. 21, 2019, which is a continuation of U.S.patent application Ser. No. 15/044,779, filed on Feb. 16, 2016, now U.S.Pat. No. 10,277,504, which is a continuation of International PatentApplication No. PCT/CN2014/081725, filed on Jul. 7, 2014, which claimspriority to Chinese Patent Application No. 201310356579.0, filed on Aug.15, 2013. All of the afore-mentioned patent applications are herebyincorporated by reference in their entireties.

TECHNICAL FIELD

Embodiment of the present invention relate to network communicationstechnologies, and in particular, to a method and an apparatus forforwarding an MPLS data packet.

BACKGROUND

Segment routing (SR) is a method for transferring, by a control plane byusing the Interior Gateway Protocol (IGP), a Multiprotocol LabelSwitching (MPLS) label that has a global meaning or local meaning and iscorresponding to an SR router. Typical IGPs are the Intermediate Systemto Intermediate System (IS-IS) protocol and the Open Shortest Path First(OSPF) protocol.

A data plane performs MPLS data packet forwarding based on an MPLS labeldelivered by a Segment Routing control plane, so as to achieve anobjective of simplifying operation and maintenance management of an MPLSnetwork.

To facilitate understanding of a segment routing technical solution, thefollowing example is presented for a scenario where a control planedelivers a label having a global meaning.

Referring to FIG. 1, an egress SR router (that is, element Z) advertisesits own node segment label according to a method defined by a segmentrouting protocol and by using an IGP protocol (such as IS-IS or OSPF)extension, and it is assumed that the node segment label is 65 (see FIG.1). When an ingress SR router (that is, element A) needs to send anoriginal data packet to Z, the ingress SR router adds a node segmentLabel (that is, “65”) corresponding to Z before the original datapacket, and then sends, to a next-hop SR router (that is, element B), anMPLS packet that is formed after the original data packet isencapsulated. In a subsequent process, an SR router (such as elements B,C, and D) that receives the foregoing MPLS data packet forwardshop-by-hop the foregoing MPLS data packet to a destination Z accordingto the node segment label (that is, “65”).

However, a scenario of hybrid networking of an SR router and a non-SRrouter is not considered in an existing Segment Routing technicalsolution. Referring to FIG. 2, it is assumed that C does not support anSR characteristic, but according to provisions in ISIS and OSPFprotocols, on a control plane, when an ISIS or OSPF node receives atype-length-value (TLV) that the ISIS or OSPF node does not know, theISIS or the OSPF node still sends the TLV to a neighboring node. Thatis, when receiving a TLV that includes SR related information (forexample, a node segment Label), although C cannot identify the TLV, Cstill advertises the TLV to a surrounding neighboring node, such as Band D. However, on a data plane, when B forwards, to C, an MPLS datapacket (a top label of the data packet is the node segment labelcorresponding to Z, that is, the label 65) that is received from A andwhose destination is Z, C discards the received MPLS data packet becauseC does not support the SR characteristic (that is, a corresponding MPLSforwarding entry does exist on the data plane).

Therefore, the inventor noticed the following issues exist in theconventional art: when router hybrid networking of an SR router and anon-SR router is used, a packet discard phenomenon occurs because arouter does not support an SR characteristic inevitably, which resultsin that an MPLS data packet cannot be correctly forwarded in a hybridnetworking environment.

SUMMARY

Embodiments of the present application provide a method and an apparatusfor forwarding an MPLS data packet, which are used to implement correctforwarding of the MPLS data packet in a scenario of hybrid networking ofan SR router and a non-SR router.

Specific technical solutions provided in the embodiments of the presentapplication are as follows:

According to a first aspect, a method for forwarding an MPLS data packetis provided, including:

receiving, by a first SR router in an SR network, the MPLS data packet;and

encapsulating, by the first SR router, the MPLS data packet into an IPtunnel when determining that a next-hop router does not support an SRcharacteristic, and sending an encapsulated MPLS data packet to thenext-hop router to enable the encapsulated MPLS data packet to beforwarded, based on an IP routing table, to a second SR router.

With reference to the first aspect, in a first possible implementationmanner, the encapsulating, by the first SR router, the MPLS data packetinto an IP tunnel specifically includes:

filling in, by the first SR router, a source address of the IP tunnelwith an IP address of the first SR router, and filling in a destinationaddress of the IP tunnel with an IP address of the second SR router.

With reference to the first possible implementation manner of the firstaspect, in a second possible implementation manner, the method furtherincludes:

learning, by the first SR router, the IP address of the second SR routeraccording to a node segment label at the top of a label stack of theto-be-sent MPLS data packet, where the node segment label at the top ofthe label stack of the MPLS data packet is a node segment label of thesecond SR router.

With reference to the first aspect, in a third possible implementationmanner, before the encapsulating, by the first SR router, the MPLS datapacket into an IP tunnel, the method includes:

determining, by the first SR router, whether a node segment label of thesecond SR router is a global label; and

if the node segment label is a global label, further determining, by thefirst SR router, whether a penultimate hop pop PHP operation needs to beperformed on the global label, where if the PHP operation needs to beperformed, a pop operation is performed on the global label, or if thePHP operation does not need to be performed, a pop operation is notperformed on the global label; or

if the node segment label is a local label, directly performing, by thefirst SR router, a pop operation on the local label.

With reference to any one of the foregoing possible implementationmanners of the first aspect, in a fourth possible implementation manner,before the encapsulating, by the first SR router, the MPLS data packetinto an IP tunnel, the method further includes:

learning, by the first SR router according to a tunnel encapsulationcapability advertisement sent by the second SR router, an IP tunnelencapsulation type that is used when the MPLS data packet isencapsulated into the IP tunnel.

According to a second aspect, a first SR router is provided, including:

a communications unit, configured to receive an MPLS data packet; and

a processing unit, configured to encapsulate the MPLS data packet intoan IP tunnel when determining that a next-hop router does not support anSR characteristic, and send an encapsulated MPLS data packet to thenext-hop router by using the communications unit to enable theencapsulated MPLS data packet to be forwarded, based on an IP routingtable, to a second SR router.

With reference to the second aspect, in a first possible implementationmanner, that the processing unit encapsulates the MPLS data packet intothe IP tunnel specifically includes that:

the processing unit fills in a source address of the IP tunnel with anIP address of the first SR router, and fills in a destination address ofthe IP tunnel with an IP address of the second SR router.

With reference to the first possible implementation manner of the secondaspect, in a second possible implementation manner, the processing unitis further configured to:

learn the IP address of the second SR router according to a node segmentlabel at the top of a label stack of the to-be-sent MPLS data packet,where the node segment label at the top of the label stack of the MPLSdata packet is a node segment label of the second SR router.

With reference to the second aspect, in a third possible implementationmanner, before the processing unit encapsulates the MPLS data packetinto the IP tunnel, the following is included:

the processing unit determines whether a node segment label of thesecond SR router is a global label; and

if the node segment label is a global label, the processing unit furtherdetermines whether a penultimate hop pop PHP operation needs to beperformed on the global label, where

if the PHP operation needs to be performed, a pop operation is performedon the global label, or if the PHP operation does not need to beperformed, a pop operation is not performed on the global label; or

if the node segment label is a local label, the processing unit directlyperforms a pop operation on the local label.

With reference to any one of the foregoing possible implementationmanners of the second aspect, in a fourth possible implementationmanner, the processing unit is further configured to:

before encapsulating the MPLS data packet into the IP tunnel, learn,according to a tunnel encapsulation capability advertisement sent by thesecond SR router, an IP tunnel encapsulation type that is used when theMPLS data packet is encapsulated into the IP tunnel.

In the embodiments of the present application, when obtaining ato-be-sent MPLS data packet, a first SR router in an SR networkdetermines whether a next-hop router supports an SR characteristic; thefirst SR router encapsulates the MPLS data packet into an IP tunnel whendetermining that the next-hop router does not support the SRcharacteristic, and sends an encapsulated MPLS data packet to thenext-hop router to enable the encapsulated MPLS data packet to beforwarded, based on an IP routing table, to a second SR router. In thisway, correct forwarding of an MPLS data packet is completed in anenvironment of hybrid networking of an SR router and a non-SR router,thereby a requirement for incremental deployment of SR networks is met.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic diagram of Segment Routing MPLS forwarding;

FIG. 2 is a schematic diagram of an error in Segment Routing MPLSforwarding;

FIG. 3 is a flowchart of forwarding an MPLS data packet in a hybridnetworking environment according to an embodiment of the presentapplication;

FIG. 4 is a first schematic diagram of forwarding an MPLS data packet ina hybrid networking environment according to an embodiment of thepresent application;

FIG. 5 is a second schematic diagram of forwarding an MPLS data packetin a hybrid networking environment according to an embodiment of thepresent application;

FIG. 6 is a schematic diagram of an encapsulation capabilitysub-type-length-value advertised by an SR router according to anembodiment of the present application; and

FIG. 7 and FIG. 8 are schematic structural diagrams of a first SR routeraccording to an embodiment of the present application.

DESCRIPTION OF EMBODIMENTS

To support a scenario of hybrid networking of an SR router and a non-SRrouter, in embodiments of the present application, a conventionalnetwork (that is, a non-SR network) is connected to nodes in a Segmentrouting network, thereby facilitating incremental deployment of segmentrouting networks.

The following describes exemplary embodiments of the present applicationin detail with reference to accompanying drawings.

Referring to FIG. 3, in a hybrid networking environment, a process offorwarding an MPLS data packet is as follows:

Step 300: After receiving the MPLS data packet, a first SR router in anSR network determines whether a next-hop router supports an SRcharacteristic.

In this embodiment of the present application, each SR router in aSegment routing network advertises its own SR capability in an entireIGP domain by using an IGP extension. Therefore, each SR router mayautomatically learn whether a next-hop router supports the SRcharacteristic.

Step 310: When determining that the next-hop router does not support theSR characteristic, the first SR router encapsulates the to-be-sent MPLSdata packet into an IP tunnel, and sends an encapsulated MPLS datapacket to the next-hop router to enable the encapsulated MPLS datapacket to be forwarded, based on an IP routing table, to a second SRrouter.

That is, the first SR router encapsulates the MPLS data packet into anIP data packet, and then forwards, based on an IP routing table, the IPdata packet that is formed after encapsulation to the second SR routerthat serves as a destination of the tunnel.

In this embodiment of the present application, when encapsulating theMPLS data packet into the IP tunnel, the first SR router fills in asource address of the IP tunnel with an IP address of the first SRrouter, and fills in a destination address of the IP tunnel with an IPaddress of the second SR router. The first SR router learns the IPaddress of the second SR router according to a node segment label (thatis, a node segment label of the second SR router) at the top of a labelstack of the MPLS data packet, that is, a mapping relationship existsbetween the node segment label of the second SR router and the IPaddress of the second SR router. The first SR router may learn the IPaddress of the second SR router according to the node segment label atthe top of the label stack of the MPLS data packet when encapsulatingthe MPLS data packet into the IP tunnel.

According to another aspect, before encapsulating the MPLS data packetinto the IP tunnel, the first SR router may determine, based on the nodesegment label of the second SR router, whether the node segment label isa global label, if the node segment label is a global label, furtherdetermine whether a penultimate hop pop (PHP) operation needs to beperformed on the global label, where if the PHP operation needs to beperformed, a pop operation is performed on the global label; or if thePHP operation does not need to be performed, a pop operation is notperformed on the global label; or if the node segment label is a locallabel, the first SR router directly performs a pop operation on thelocal label.

In the foregoing embodiment, further, the first SR router learns,according to a notification of the second SR router, an IP tunnelencapsulation type (that is, a type of a header of an encapsulation IPtunnel) that is used when the MPLS data packet is encapsulated into theIP tunnel. For example, before encapsulating the MPLS data packet intothe IP tunnel, the first SR router may learn, according to a tunnelencapsulation capability advertisement sent by the second SR router, theIP tunnel encapsulation type that is used when the MPLS data packet isencapsulated into the IP tunnel, for example, a generic routingencapsulation (GRE) tunnel type. Certainly, an IP tunnel encapsulationformat that is to be used may also be agreed on in advance between SRrouters in a system.

The following uses several specific application scenarios to furtherdescribe the foregoing embodiment in detail.

It is assumed that A is an ingress SR router, B and D are intermediateSR routers, C is a Non-SR router, and Z is an egress SR router. In thiscase, when receiving, from A, an MPLS data packet whose top label is anode segment label (that is, “65”) corresponding to Z, B finds that anext-hop (that is, element C) in an MPLS forwarding entry correspondingto the MPLS data packet is a non-SR router, and then, B determineswhether the node segment label corresponding to Z is a global label. Ifthe node segment label corresponding to Z is a global label, B furtherdetermines whether a PHP operation needs to be performed on the globallabel; if the PHP operation does not need to be performed, B directlyencapsulates the MPLS data packet into an IP tunnel (for example, a GREtunnel), and for details, refer to FIG. 4; if the PHP operation needs tobe performed, B encapsulates the MPLS data packet into the IP tunnelafter peeling the top label of the MPLS data packet, and for details,refer to FIG. 5. If the node segment label corresponding to Z is a locallabel, B directly encapsulates the MPLS data packet into the IP tunnelafter peeling the top label of the MPLS data packet, and for details,refer to FIG. 5. A destination address of the IP tunnel is an IP addressof Z, and a source address of the IP tunnel is an IP address of B. Anencapsulated MPLS data packet is forwarded in a hop-by-hop IP forwardingmanner, that is, is forwarded by using IP of C and D, and reaches adestination (that is, element Z) of the IP tunnel. Z performs IP tunneldecapsulation on the received data packet, and then performscorresponding processing on a decapsulated MPLS data packet.

Certainly, the foregoing example is described by using an example inwhich the MPLS data packet is forwarded from B to Z hop-by-hop and basedon an IP routing table. In an actual application, if a networkenvironment permits, an MPLS data packet B may also be directlyforwarded from B to Z and based on the routing table.

Further, in this embodiment of the present application, to make a nodelocated at ingress of the IP tunnel (that is, element B) to learn an IPtunnel encapsulation format supported by an egress node of the IP tunnel(that is, element Z). The node Z advertises, by using an InteriorGateway Protocol (IGP) extension, an IP tunnel encapsulation formatsupported by the node Z to another SR router in an IGP domain.Specifically, Z may support one or more IP tunnel encapsulation formats,for example, a GRE tunnel and a User Datagram Protocol (UDP) tunnel.

The ISIS is used as an example; Z may implement advertisement of the IPtunnel encapsulation format in the system by carrying, in a routercapability type-length-value (Router Capability TLV), an encapsulationcapability sub-type-length-value (Encapsulation Capability Sub-TLV)shown in FIG. 6.

A Type field of the encapsulation capability Sub-TLV is filled in with aType code of an IP tunnel encapsulation format allocated by the InternetAssigned Numbers Authority (IANA), for example, Type code of the GREtunnel=1 and Sub-TLV Type code of the UDP tunnel=2; if a Length field isset to 0, it indicates that a value field of the Sub-TLV is null.

In this embodiment of the present application, hybrid networking of anSR router and a non-SR router is implemented, thereby a requirement forincremental deployment of SR networks is met. The Non-SR router (such aselement C) may be a router that does not have an MPLS forwardingcapability at all.

Referring to FIG. 7, in an embodiment of the present application, afirst SR router includes a communications unit 70 and a processing unit71, where:

the communications unit 70 is configured to receive an MPLS data packet;and

the processing unit 71 is configured to encapsulate the MPLS data packetinto an IP tunnel when determining that a next-hop router does notsupport an SR characteristic, and send an encapsulated MPLS data packetto the next-hop router by using the communications unit 70 to enable theencapsulated MPLS data packet to be forwarded, based on an IP routingtable, to a second SR router.

That the processing unit 71 encapsulates the MPLS data packet into theIP tunnel specifically includes that:

the processing unit 71 fills in a source address of the IP tunnel withan IP address of the first SR router, and fills in a destination addressof the IP tunnel with an IP address of the second SR router.

The processing unit 71 is further configured to:

learn the IP address of the second SR router according to a node segmentlabel at the top of a label stack of the to-be-sent MPLS data packet,where the node segment label at the top of the label stack of the MPLSdata packet is a node segment label of the second SR router.

Before the processing unit 71 encapsulates the MPLS data packet into theIP tunnel, the following is included:

the processing unit 71 determines whether the node segment label of thesecond SR router is a global label; and

if the node segment label is a global label, the processing unit 71further determines whether a penultimate hop pop (PHP) operation needsto be performed on the global label, where if the PHP operation needs tobe performed, a pop operation is performed on the global label, or ifthe PHP operation does not need to be performed, a pop operation is notperformed on the global label; or

if the node segment label is a local label, the processing unit 71directly performs a pop operation on the local label.

The processing unit 71 is further configured to:

before encapsulating the MPLS data packet into the IP tunnel, learn,according to a tunnel encapsulation capability advertisement sent by thesecond SR router, an IP tunnel encapsulation type that is used when theMPLS data packet is encapsulated into the IP tunnel.

Referring to FIG. 8, in an embodiment of the present application, afirst SR router includes a communications port 80 and a processor 81,where:

the communications port 80 is configured to receive an MPLS data packet;and

the processor 81 is configured to encapsulate the MPLS data packet intoan IP tunnel when determining that a next-hop router does not support anSR characteristic, and send an encapsulated MPLS data packet to thenext-hop router by using the communications port 80 to enable theencapsulated MPLS data packet to be forwarded, based on an IP routingtable, to a second SR router.

That the processor 81 encapsulates the MPLS data packet into the IPtunnel specifically includes that:

the processor 81 fills in a source address of the IP tunnel with an IPaddress of the first SR router, and fills in a destination address ofthe IP tunnel with an IP address of the second SR router.

The processor 81 is further configured to:

learn the IP address of the second SR router according to a node segmentlabel at the top of a label stack of the to-be-sent MPLS data packet,where the node segment label at the top of the label stack of the MPLSdata packet is a node segment label of the second SR router.

Before the processor 81 encapsulates the MPLS data packet into the IPtunnel, the following is included:

the processor 81 determines whether the node segment label of the secondSR router is a global label; and

if the node segment label is a global label, the processor 81 furtherdetermines whether a penultimate hop pop PHP operation needs to beperformed on the global label, where if the PHP operation needs to beperformed, a pop operation is performed on the global label, or if thePHP operation does not need to be performed, the pop operation is notperformed on the global label; or

if the node segment label is a local label, the processor 81 directlyperforms a pop operation on the local label.

The processor 81 is further configured to:

before encapsulating the MPLS data packet into the IP tunnel, learn,according to a tunnel encapsulation capability advertisement sent by thesecond SR router, an IP tunnel encapsulation type that is used when theMPLS data packet is encapsulated into the IP tunnel.

By using the foregoing solution, correct forwarding of an MPLS datapacket is completed in an environment of hybrid networking of an SRrouter and a non-SR router, thereby meeting a requirement forincremental deployment of SR networks.

A person skilled in the art should understand that the embodiments ofthe present application may be provided as a method, a system, or acomputer program product. Therefore, the present application may use aform of hardware only embodiments, software only embodiments, orembodiments with a combination of software and hardware. Moreover, thepresent application may use a form of a computer program product that isimplemented on one or more computer-usable storage media (including butnot limited to a disk memory, a CD-ROM, an optical memory, and the like)that include computer-usable program code.

The present application is described with reference to the flowchartsand/or block diagrams of the method, the device (system), and thecomputer program product according to the embodiments of the presentinvention. It should be understood that computer program instructionsmay be used to implement each process and/or each block in theflowcharts and/or the block diagrams and a combination of a processand/or a block in the flowcharts and/or the block diagrams. Thesecomputer program instructions may be provided for a general-purposecomputer, a dedicated computer, an embedded processor, or a processor ofany other programmable data processing device to generate a machine, sothat the instructions executed by a computer or a processor of any otherprogrammable data processing device generate an apparatus forimplementing a specific function in one or more processes in theflowcharts and/or in one or more blocks in the block diagrams.

These computer program instructions may also be stored in a computerreadable memory that can instruct the computer or any other programmabledata processing device to work in a specific manner, so that theinstructions stored in the computer readable memory generate an artifactthat includes an instruction apparatus. The instruction apparatusimplements a specific function in one or more processes in theflowcharts and/or in one or more blocks in the block diagrams.

These computer program instructions may also be loaded onto a computeror another programmable data processing device, so that a series ofoperations and steps are performed on the computer or the otherprogrammable device, thereby generating computer-implemented processing.Therefore, the instructions executed on the computer or the otherprogrammable device provide steps for implementing a specific functionin one or more processes in the flowcharts and/or in one or more blocksin the block diagrams.

Although some preferred embodiments of the present application have beendescribed, a person skilled in the art can make changes andmodifications to these embodiments once they learn the basic inventiveconcept. Therefore, the following claims are intended to be construed asto cover the preferred embodiments of the present application and allchanges and modifications falling within the scope of the presentapplication.

Obviously, a person skilled in the art can make various modificationsand variations to the embodiments of the present application withoutdeparting from the spirit and scope of the embodiments of the presentapplication. Embodiments of the present application is intended to coverthese modifications and variations provided that they fall within thescope of protection defined by the following claims and their equivalenttechnologies.

The invention claimed is:
 1. A method for sending a multiprotocol labelswitching (MPLS) data packet, the method comprising: receiving, by afirst segment routing (SR) router in an SR network, a tunnelencapsulation capability advertised by a second SR router; determining,by the first SR router, an internet protocol (IP) tunnel encapsulationtype according to the tunnel encapsulation capability; encapsulating, bythe first SR router, the MPLS data packet into an IP tunnel according tothe IP tunnel encapsulation type; and sending, by the first SR router,the encapsulated MPLS data packet to the second SR router.
 2. The methodaccording to claim 1, wherein the tunnel encapsulation capability isadvertised by the second SR router using an interior gateway protocol.3. The method according to claim 1, wherein the IP tunnel encapsulationtype is a type of a header of an encapsulation IP tunnel.
 4. The methodaccording to claim 1, wherein the second SR router support one or moreIP tunnel encapsulation types.
 5. The method according to claim 1,wherein the tunnel encapsulation capability comprises an encapsulationcapability sub-type-length-value (sub-TLV).
 6. The method according toclaim 5, wherein a type field of the encapsulation capability sub-TLV isfilled in with a type code of an IP tunnel encapsulation formatallocated by an internet assigned numbers authority.
 7. A first segmentrouting (SR) router comprising: a receiver configured to cooperate witha processor to receive a tunnel encapsulation capability advertised by asecond SR router; the processor configured to determine an internetprotocol (IP) tunnel encapsulation type according to the tunnelencapsulation capability, and encapsulate a multiprotocol labelswitching (MPLS) data packet into an IP tunnel according to the IPtunnel encapsulation type; and a transmitter configured to cooperatewith the processor to send the encapsulated MPLS data packet to thesecond SR router.
 8. The first SR router according to claim 7, whereinthe tunnel encapsulation capability is advertised by the second SRrouter using an interior gateway protocol.
 9. The first SR routeraccording to claim 7, wherein the IP tunnel encapsulation type is a typeof a header of an encapsulation IP tunnel.
 10. The first SR routeraccording to claim 7, wherein the second SR router support one or moreIP tunnel encapsulation types.
 11. The first SR router according toclaim 7, wherein the tunnel encapsulation capability comprises anencapsulation capability sub-type-length-value (sub-TLV).
 12. The firstSR router according to claim 11, wherein a type field of theencapsulation capability sub-TLV is filled in with a type code of an IPtunnel encapsulation format allocated by an internet assigned numbersauthority.
 13. A non-transitory computer readable medium, comprisingprocessor-executable instructions which when executed by a processor ofa first segment routing (SR) router in an SR network, causes the firstSR router to implement the following method for sending a multiprotocollabel switching (MPLS) data packet: receiving a tunnel encapsulationcapability advertised by a second SR router; determining an internetprotocol (IP) tunnel encapsulation type according to the tunnelencapsulation capability; encapsulating the MPLS data packet into an IPtunnel according to the IP tunnel encapsulation type; and sending theencapsulated MPLS data packet to the second SR router.
 14. Thenon-transitory computer readable medium according to claim 13, whereinthe tunnel encapsulation capability is advertised by the second SRrouter using an interior gateway protocol.
 15. The non-transitorycomputer readable medium according to claim 13, wherein the IP tunnelencapsulation type is a type of a header of an encapsulation IP tunnel.16. The non-transitory computer readable medium according to claim 13,wherein the second SR router support one or more IP tunnel encapsulationtypes.
 17. The non-transitory computer readable medium according toclaim 13, wherein the tunnel encapsulation capability comprises anencapsulation capability sub-type-length-value (sub-TLV).
 18. Thenon-transitory computer readable medium according to claim 17, wherein atype field of the encapsulation capability sub-TLV is filled in with atype code of an IP tunnel encapsulation format allocated by an internetassigned numbers authority.